DEFINITION MODULE Dialog;

   (* This module defines types and procedures for manipulating  *)
   (* dialog boxes.  Note that information may be stored into or *)
   (* retrieved from a dialog by invoking the routines contained *)
   (* in module "Icon".                                          *)


   IMPORT Screen;


   CONST NoEditableField = -1;

      (* A dialog oftens contains information that may not be changed *)
      (* by the user.  This constant is used to inform GEM that the   *)
      (* dialog may not be modified.                                  *)


   PROCEDURE Display ( DialogNumber   : INTEGER;
                       GrowFromBox    : Screen.Box;
                       EditField      : INTEGER ) : INTEGER;

      (* Display a dialog box and monitor the user's actions.  If the *)
      (* dialog does not contain information that may be changed by   *)
      (* the user, the constant "NoEditableField" must be used as the *)
      (* "EditField" parameter.  This routine completes once the user *)
      (* selects an exit object, which is returned to the caller.     *)


   PROCEDURE GetText ( DialogNumber : INTEGER;
                       FieldNumber  : INTEGER;
                       VAR Value    : ARRAY OF CHAR );


   PROCEDURE PutText ( DialogNumber : INTEGER;
                       FieldNumber  : INTEGER;
                      Value        : ARRAY OF CHAR );


   PROCEDURE Select ( DialogNumber : INTEGER;
                      FieldNumber  : INTEGER );


   PROCEDURE Deselect ( DialogNumber : INTEGER;
                        FieldNumber  : INTEGER );


   PROCEDURE IsSelected ( DialogNumber : INTEGER;
                          FieldNumber  : INTEGER ) : BOOLEAN;


END Dialog.

